/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sirtet.tetris.gui.fancy;

import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import sirtet.Player;
import sirtet.tetris.TetrisBoard;
import sirtet.tetris.gui.NextPiecePanel;
import sirtet.tetris.gui.TetrisBoardPanel;
import sirtet.tetris.gui.TetrisGamePanel;

/**
 * (For testing purpose only) a window monitor which visualizes the status of a TetrisBoard
 * @author guangwei.zhu
 */
public class FancyFrame extends JFrame {

    public FancyFrame(TetrisBoard board, Player player) {
        this(board);

        this.setTitle("Server Monitor - " + player.id());
    }

    public FancyFrame(TetrisBoard board) {

        boardPanel = new FancyBoardPanel(board);

        this.setLayout(new BorderLayout());

        this.add(boardPanel, BorderLayout.CENTER);
        this.setSize(494, 750);

        this.setVisible(true);

        this.setTitle("Server Monitor");
    }

    private TetrisBoardPanel boardPanel;
}
